import { newRequest } from '@/utils/newRequest'

//查询列表
export function getProductionPlanDOList(params) {
    return newRequest({
        url: '/api/Plan/GetProductionPlanDOList',
        method: 'get',
        params: {
            ...params
        }
    })
}

//换线
export function updateLineOfProductionPlan(data) {
    return newRequest({
        url: '/api/Plan/UpdateLineOfProductionPlan',
        method: 'post',
        data: {
            ...data
        }
    })
}
// 加急
export function priorityOfProductionPlan(data) {
    return newRequest({
        url: '/api/Plan/PriorityOfProductionPlan',
        method: 'post',
        data: {
            ...data
        }
    })
}
//暂停
export function pauseOfProductionPlan(data) {
    return newRequest({
        url: '/api/Plan/PauseOfProductionPlan',
        method: 'post',
        data: {
            ...data
        }
    })
}
// 切换排程
export function switchProductionPlan(data) {
    return newRequest({
        url: '/api/Plan/SwitchProductionPlan',
        method: 'post',
        data: {
            ...data
        }
    })
}
//排程操作日志
export function getProductionPlanLog(params) {
    return newRequest({
        url: '/api/system/GetUseLogList',
        method: 'get',
        params: {
            ...params
        }
    })
}

//  新强制打印
export function ForcePrintProductPlan(params) {
  return newRequest({
    url: '/api/ProductPlan/ForcePrintProductPlan',
    method: 'post',
    params
  })
}

//  重拼
export function DeleteProductPlan(params) {
  return newRequest({
    url: '/api/ProductPlan/DeleteProductPlan',
    method: 'post',
    params
  })
}

//获取排程照片列表
export function getOrderFilesByProductionPlanId(params) {
    return newRequest({
        url: '/api/Plan/GetOrderFilesByProductionPlanId',
        method: 'get',
        params: {
            ...params
        }
    })
}

//
export function GetProductPlanProductInfo(params) {
  return newRequest({
    url: '/api/ProductPlan/GetProductPlanProductInfo',
    method: 'get',
    params
  })
}

// 强制打印
export function forcedToPrintOfProductionPlan(data) {
    return newRequest({
        url: '/api/Plan/ForcedToPrintOfProductionPlan',
        method: 'post',
        data: {
            ...data
        }
    })
}

// 恢复排程
export function recoverOfProductionPlan(data) {
    return newRequest({
        url: '/api/Plan/RecoverOfProductionPlan',
        method: 'post',
        data: {
            ...data
        }
    })
}
